<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
	<div id="box">
		
	</div>

	<button style='margin-top: 400px' class="btn">获取值</button>

	
	<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
	<script type="text/javascript">
		let obj = {
			'inp1':'',
			'inp2':'',
			'inp3':'',
			'inp4':'',
			'inp5':'',
		}
		var str = '';
		for(let item in obj ){
			str+='<div><label>'+item+'</label><input class="inp" type="text" name="" value=""></div>'
		}
		$('#box').html(str);

		let inpValue = [];

		$('.btn').on('click',function(){
			$('.inp').each(function(index,item){
				inpValue.push($(this).val())
			});
			let len=0;
			for(let item in obj){
				obj[item] = inpValue[len];
				len++;
			}
			console.log(obj)
		});
		
	</script>
</body>
</html>